package com.ztesoft.web.common.vo;

import java.util.Date;

import org.apache.commons.lang.StringUtils;

import com.ztesoft.framework.dto.AbstractDto;

/**
 * 
 * 与IOCP同步数据VO
 * 
 * @author lin.weibin@zte.com.cn
 * @date 2015年9月10日
 * @since 1.0
 */
public class DbUserInfoVO extends AbstractDto {
	private Integer dbUserId;
	private Integer dbLinkId;
	private String dbUserName;
	private String dbPassword;
	private Integer dbEncryptType;
	private String state;
	private Date stateDate;
	private Date createDate;
	private String op;

	public Integer getDbUserId() {
		return dbUserId;
	}

	public void setDbUserId(Integer dbUserId) {
		this.dbUserId = dbUserId;
	}

	public Integer getDbLinkId() {
		return dbLinkId;
	}

	public void setDbLinkId(Integer dbLinkId) {
		this.dbLinkId = dbLinkId;
	}

	public String getDbUserName() {
		return StringUtils.isBlank(dbUserName) ? dbUserName : dbUserName.trim();
	}

	public void setDbUserName(String dbUserName) {
		this.dbUserName = dbUserName;
	}

	public String getDbPassword() {
		return StringUtils.isBlank(dbPassword) ? dbPassword : dbPassword.trim();
	}

	public void setDbPassword(String dbPassword) {
		this.dbPassword = dbPassword;
	}

	public Integer getDbEncryptType() {
		return dbEncryptType;
	}

	public void setDbEncryptType(Integer dbEncryptType) {
		this.dbEncryptType = dbEncryptType;
	}

	public String getState() {
		return StringUtils.isBlank(state) ? state : state.trim();
	}

	public void setState(String state) {
		this.state = state;
	}

	public Date getStateDate() {
		if (this.stateDate != null) 
			return (Date) stateDate.clone();
		return null;
	}

	public void setStateDate(Date stateDate) {
		if (stateDate == null) {
			this.stateDate = null;
		} else {			
			this.stateDate = (Date)stateDate.clone();
		}
	}

	public Date getCreateDate() {
		if(createDate == null) {
	        return null;
	    }
	    return (Date) createDate.clone();
	}

	public void setCreateDate(Date createDate) {
		if (createDate == null) {
			this.createDate = null;
		} else {			
			this.createDate = (Date) createDate.clone();
		}
	}

	public String getOp() {
		return op;
	}

	public void setOp(String op) {
		this.op = op;
	}

}